package com.corona.game;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.math.Vector2;
import com.corona.Game;
import com.corona.game.util.TextureCache;

/* compiled from: Player.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/DespawnGhost.class */
class DespawnGhost extends Action {
    Sprite[] sprites;
    int part2;
    int part3;
    Vector2 position;
    public Action.Layer layer = Action.Layer.map_114;
    int part1 = 80;
    Sprite sprite = new Sprite(TextureCache.get(Gdx.files.internal("ghost_spawn1.png")), 0, 0, 40, 40);

    public DespawnGhost(Vector2 position) {
        super(new Object[0]);
        this.position = position;
        this.sprite.setPosition(position.x - 4.0f, position.y - 4.0f);
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        if (this.part1 > 0) {
            if (this.part1 % 4 >= 2) {
                this.sprite.draw(game.mapBatch);
            }
            this.part1--;
            return;
        }
        game.actionStack.remove(this);
    }
}
